package com.exam.exception;


import com.exam.vo.examEnum.ResultCode;

public class BaseException extends RuntimeException {

    private static final long serialVersionUID = -9128274864052430843L;
    private String msg;
    private ResultCode resultCode;

    public BaseException() {
        this.resultCode = ResultCode.BAD_REQUEST;
    }

    public BaseException(String msg) {
        super(msg);
        this.resultCode = ResultCode.BAD_REQUEST;
        this.msg = msg;
    }

    public BaseException(ResultCode resultCode) {
        super(resultCode.getMsg());
        this.msg = resultCode.getMsg();
        this.resultCode = resultCode;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public ResultCode getResultCode() {
        return resultCode;
    }

    public void setResultCode(ResultCode resultCode) {
        this.resultCode = resultCode;
    }

}
